<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="/common/template :: header(~{::title},~{::link},~{::style})">
</head>
<body>
<div class="layui-form timo-compile">
    <div class="timo-detail-page">
        <div class="timo-detail-title">支付单号信息填写</div>
            <table class="layui-table timo-detail-table">
                <colgroup>
                    <col width="100px"><col>
                    <col width="100px"><col>
                </colgroup>
                <tbody>

    <!--                <tr>-->
    <!--                    <th>主键ID</th>-->
    <!--                    <td th:text="${payment.id}"></td>-->
    <!--                    <th>标题</th>-->
    <!--                    <td th:text="${payment.title}"></td>-->
    <!--                </tr>-->
<!--                    <tr>-->
<!--                        <th>对应文章</th>-->
<!--                        <td th:text="${payment.articleID.title}"></td>-->
<!--                        <th>支付对象</th>-->
<!--                        <td th:text="${payment.userID.nickname}"></td>-->
<!--                    </tr>-->
                    <tr>
                        <th>支付方式</th>
                        <td th:text="${payment.payMethod}"></td>
                        <th>金额</th>
                        <td th:text="${payment.money}"></td>
                    </tr>
                    <tr>
                        <form th:action="@{/system/payment/payed}" method="post">
                            <input type="hidden" id="paymentID" name="id" th:if="${payment}" th:value="${payment.id}">
    <!--                        <div class="layui-form-item" type="hidden">-->
    <!--                            <label class="layui-form-label">对应文章</label>-->
    <!--                            <div class="layui-input-inline">-->
    <!--                                <input class="layui-input" type="text" name="articleID" placeholder="请输入对应文章" th:value="${payment?.getArticleID()}">-->
    <!--                            </div>-->
    <!--                        </div>-->
    <!--                        <div class="layui-form-item" type="hidden">-->
    <!--                            <label class="layui-form-label">支付对象</label>-->
    <!--                            <div class="layui-input-inline">-->
    <!--                                <input class="layui-input" type="text" name="userID" placeholder="请输入支付对象" th:value="${payment?.getUserID()}">-->
    <!--                            </div>-->
    <!--                        </div>-->
                            <div class="layui-form-item" type="hidden">
                                <label class="layui-form-label">金额</label>
                                <div class="layui-input-inline">
                                    <input class="layui-input" disabled="disabled" type="text" name="money" placeholder="请输入金额" th:value="${payment?.money}">
                                </div>
                            </div>
                            <div class="layui-form-item layui-form-text">
                                <label class="layui-form-label">支付相关单号填写：</label>
                                <div class="layui-input-block">
                                    <textarea id="remark" placeholder="请输入内容" class="layui-textarea" name="remark">[[${payment?.remark}]]</textarea>
                                </div>
                            </div>
                            <div class="layui-form-item timo-finally">
<!--                                ajax-submit-->
                                <button onclick="location.reload();" type="submit" class="layui-btn"><i class="fa fa-check-circle"></i> 保存</button>
                            </div>
                        </form>
                    </tr>
                </tbody>
            </table>

        </div>
    </div>
<script th:replace="/common/template :: script"></script>
<script th:src="@{/vendor/jquery/jquery.min.js}"></script>
<script>
    function savePaymentInfo(){
        let id = $('#paymentID').text();
        let remark = $('#remark').text();
        // $.post("/system/payment/payed")
    }

</script>
</body>
</html>